package com.chushouya.manager.service.async;


import com.chushouya.manager.dto.admin.im.ImBody;
import com.general.framework.core.lang.Jsons;
import lombok.extern.slf4j.Slf4j;

import java.util.TimerTask;

/**
 * 消息模块异步工厂
 * @author leejean team
 */
@Slf4j
public class ManagerAsyncFactory {

    /**
     * 操作日志记录
     */
    public static TimerTask asyncSaveNotice(ImBody imBody) {
        return new TimerTask() {
            @Override
            public void run() {
                log.info("===>异步执行【异步保存通知到数据库】:{}", Jsons.toJsonString(imBody));
                try {

                } catch (Exception e) {
                    log.error("异步执行【异步保存通知到数据库】异常:{}", Jsons.toJsonString(imBody), e);
                }
            }
        };
    }
}
